package com.kayt.cyberBar.cuser.business.entity.po;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * BPositionTask entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "b_position_task")
public class BPositionTask implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6974457671607606490L;
	// Fields

	private Long id;
	private String positionCode;
	private String shiftCode;
	private String workCode;
	private String taskCode;
	private String taskLevelCode;
	private String taskTypeCode;
	private String createTime;
	private String updateTime;
	private String statusCode;
	
	private BPositionTaskAppoint positionTaskAppoint;
	private BPositionTaskDetail positionTaskDetail;
	private BPositionTaskRes positionTaskRes;

	// Constructors

	/** default constructor */
	public BPositionTask() {
	}

	/** full constructor */
	public BPositionTask(String positionCode, String taskCode,
			String taskLevelCode, String taskTypeCode, String createTime,
			String updateTime, String statusCode) {
		this.positionCode = positionCode;
		this.taskCode = taskCode;
		this.taskLevelCode = taskLevelCode;
		this.taskTypeCode = taskTypeCode;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.statusCode = statusCode;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "POSITION_CODE", length = 64)
	public String getPositionCode() {
		return this.positionCode;
	}

	public void setPositionCode(String positionCode) {
		this.positionCode = positionCode;
	}

	@Column(name = "TASK_CODE", length = 64)
	public String getTaskCode() {
		return this.taskCode;
	}

	public void setTaskCode(String taskCode) {
		this.taskCode = taskCode;
	}

	@Column(name = "TASK_LEVEL_CODE", length = 64)
	public String getTaskLevelCode() {
		return this.taskLevelCode;
	}

	public void setTaskLevelCode(String taskLevelCode) {
		this.taskLevelCode = taskLevelCode;
	}

	@Column(name = "TASK_TYPE_CODE", length = 64)
	public String getTaskTypeCode() {
		return this.taskTypeCode;
	}

	public void setTaskTypeCode(String taskTypeCode) {
		this.taskTypeCode = taskTypeCode;
	}

	@Column(name = "CREATE_TIME", length = 64)
	public String getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	@Column(name = "UPDATE_TIME", length = 64)
	public String getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "STATUS_CODE", length = 64)
	public String getStatusCode() {
		return this.statusCode;
	}

	public void setStatusCode(String statusCode) {
		this.statusCode = statusCode;
	}

	@Column(name = "WORK_CODE", length = 64)
	public String getWorkCode() {
		return workCode;
	}

	public void setWorkCode(String workCode) {
		this.workCode = workCode;
	}
	
	@Column(name = "SHIFT_CODE", length = 64)
	public String getShiftCode() {
		return shiftCode;
	}

	public void setShiftCode(String shiftCode) {
		this.shiftCode = shiftCode;
	}

	@OneToOne(targetEntity = BPositionTaskAppoint.class, fetch = FetchType.EAGER)
	@JoinColumn(name="TASK_CODE", referencedColumnName="TASK_CODE", nullable = true,insertable=false ,updatable=false)
	public BPositionTaskAppoint getPositionTaskAppoint() {
		return positionTaskAppoint;
	}

	public void setPositionTaskAppoint(BPositionTaskAppoint positionTaskAppoint) {
		this.positionTaskAppoint = positionTaskAppoint;
	}

	@OneToOne(targetEntity = BPositionTaskDetail.class, fetch = FetchType.EAGER)
	@JoinColumn(name="TASK_CODE", referencedColumnName="TASK_CODE", nullable = true,insertable=false ,updatable=false)
	public BPositionTaskDetail getPositionTaskDetail() {
		return positionTaskDetail;
	}

	public void setPositionTaskDetail(BPositionTaskDetail positionTaskDetail) {
		this.positionTaskDetail = positionTaskDetail;
	}

	@OneToOne(targetEntity = BPositionTaskRes.class, fetch = FetchType.EAGER)
	@JoinColumn(name="TASK_CODE", referencedColumnName="TASK_CODE", nullable = true,insertable=false ,updatable=false)
	public BPositionTaskRes getPositionTaskRes() {
		return positionTaskRes;
	}

	public void setPositionTaskRes(BPositionTaskRes positionTaskRes) {
		this.positionTaskRes = positionTaskRes;
	}

}